#ifndef REPLACERULESDELEGATE_H
#define REPLACERULESDELEGATE_H

#include <QItemDelegate>

class ReplaceRulesDelegate : public QItemDelegate
{
Q_OBJECT
public:
    explicit ReplaceRulesDelegate(QObject *parent = 0);
    void paint(QPainter *painter, const QStyleOptionViewItem& option, const QModelIndex& index);
    QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
    void setEditorData(QWidget *editor, const QModelIndex &index) const;
    void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
private slots:
    void commitAndCloseEditor();
    void commitAndCloseEditor(int);
};

#endif // REPLACERULESDELEGATE_H
